package jmine.tec.services.integration;

import static jmine.tec.services.api.ActionsEnum.PRE_REQ;
import jmine.tec.di.annotation.Injected;
import jmine.tec.services.annotations.Execution;
import jmine.tec.services.annotations.Output;
import jmine.tec.services.annotations.ServiceImplementor;
import jmine.tec.services.api.RawInput;

/**
 * Service that defines a global parameter
 * 
 * @author lundberg
 */
@ServiceImplementor(action = PRE_REQ, stateless = true)
public class GlobalParameterService {

    public static final String REFERENCE = "Reference";

    public static final String VALUE = "Value";

    /**
     * Returns the value, storing on the given property
     * 
     * @param value value
     * @return value
     */
    @Execution
    @Output(propertyName = REFERENCE)
    public String execute(@Injected RawInput input) {
        return input.getRaw(VALUE);
    }

}
